Experienced / Expert level questions
Experienced / Expert level questions & answers
Ques 1. What is the purpose of the @Factory annotation?
The @Factory annotation in TestNG is used to create a factory method that can produce instances of the test class. This is useful for dynamic test case generation.
Ques 2. What is the purpose of the IRetryAnalyzer interface in TestNG?
The IRetryAnalyzer interface in TestNG allows you to implement custom logic to decide whether a test method should be retried after a failure. It is used in conjunction with the @Test annotation's 'retryAnalyzer' attribute.
Ques 3. Explain the purpose of the @Parameters annotation in conjunction with @Factory.
The @Parameters annotation in conjunction with @Factory allows you to pass parameters to the factory method, creating dynamic instances of the test class with different parameter values.
Ques 4. What is the purpose of the IReporter interface in TestNG?
The IReporter interface in TestNG allows you to create custom HTML reports by implementing the generateReport() method. It provides flexibility in generating test reports.
Ques 5. What is the purpose of the IAnnotationTransformer interface in TestNG?
The IAnnotationTransformer interface in TestNG allows you to modify the annotations of test methods or classes dynamically. It is useful for altering the behavior of tests at runtime.
Most helpful rated by users:
Related interview subjects
QTP interview questions and answers - Total 44 questions |
Cucumber interview questions and answers - Total 30 questions |
TestNG interview questions and answers - Total 38 questions |
Postman interview questions and answers - Total 30 questions |
SDET interview questions and answers - Total 30 questions |
Quality Assurance interview questions and answers - Total 56 questions |
Mobile Testing interview questions and answers - Total 30 questions |
Kali Linux interview questions and answers - Total 29 questions |
UiPath interview questions and answers - Total 38 questions |
Selenium interview questions and answers - Total 40 questions |
API Testing interview questions and answers - Total 30 questions |
Appium interview questions and answers - Total 30 questions |
ETL Testing interview questions and answers - Total 20 questions |